import request from '@/utils/request'

export function page(query) {
  return request({
    url: '/api/admin/FireServiceProductType/page',
    method: 'get',
    params: query
  })
}

export function add(Obj) {
  return request({
    url: '/api/admin/FireServiceProductType',
    method: 'post',
    data: Obj
  })
}
export function del(id) {
  return request({
    url: '/api/admin/FireServiceProductType/' + id,
    method: 'delete'
  })
}

export function get(id) {
  return request({
    url: '/api/admin/FireServiceProductType/' + id,
    method: 'get'
  })
}

export function upd(id, obj) {
  return request({
    url: '/api/admin/FireServiceProductType/' + id,
    method: 'put',
    data: obj
  })
}

export function getServiceTypeList(placeType) {
  return request({
    url: '/api/admin/FireServiceProductType/serviceType',
    method: 'get',
    params: { placeType }
  })
}

export function addServiceConfig(Obj) {
  return request({
    url: '/api/admin/FireServiceProductConfig',
    method: 'post',
    data: Obj
  })
}

export function updServiceConfig(id, obj) {
  return request({
    url: '/api/admin/FireServiceProductConfig/' + id,
    method: 'put',
    data: obj
  })
}
export function delServiceConfig(id) {
  return request({
    url: '/api/admin/FireServiceProductConfig/' + id,
    method: 'delete'
  })
}

export function getServiceConfig(id) {
  return request({
    url: '/api/admin/FireServiceProductConfig/' + id,
    method: 'get'
  })
}

export function pageServiceConfig(query) {
  return request({
    url: '/api/admin/FireServiceProductConfig/page',
    method: 'get',
    params: query
  })
}

export function orderList(query) {
  return request({
    url: '/api/admin/FireServiceScreeningProductOrder/orderList',
    method: 'get',
    params: query
  })
}
// 下载订单
export function productWord(id) {
  return request({
    url: '/api/admin/FireServiceScreeningProduct/exportWord/' + id,
    method: 'get'
  })
}

// 下载订单
export function productValidation(typeId) {
  return request({
    url: '/api/admin/FireServiceProductConfig/productValidation/' + typeId,
    method: 'get'
  })
}
